package handler

import (
	"goweb/service"
	"goweb/util"
	"net/http"
)

//UserInfo 获取用户信息
func UserInfo(w http.ResponseWriter, r *http.Request) {
	r.ParseForm()
	user, err := service.GetUser(r.FormValue("userId"))
	if nil != err {
		util.ReturnJSON(w, util.PkgResult(false, "1", err.Error(), user))
	}
	// 返回分页json
	util.ReturnJSON(w, util.PkgResult(true, "0", "成功", user))

}
